﻿@using System.EnterpriseServices
@using System.EnterpriseServices.Internal

@using System.Security.Cryptography.X509Certificates
@using Admin.Areas.Administration.Common.MenuManager
@using Admin.Models
@using System.Reflection;
@using System.Resources;
@{
    MenuManagement.ListMenuAdmin = new List<TblMenuAdmin>();
    
    var rm = new ResourceManager("resources.Resource", Assembly.Load("App_GlobalResources"));
}

<div class="span2 main-menu-span">
    <div class="well nav-collapse sidebar-nav">
        <ul class="nav nav-tabs nav-stacked main-menu">

                @foreach (var item in MenuManagement.LoadMenu())
                {

                    if (string.IsNullOrEmpty(item.ControllerName))
                    {
                        @Html.Raw("<li class = nav-header hidden-tablet>" + rm.GetString(item.LinkText) + "</li>")
                    }
                    else
                    {
                        @Html.Raw("<li style='margin-left: -2px;'>")

                        if (!string.IsNullOrEmpty(item.LinkText))
                        {
                            
                            @Html.ActionLink(rm.GetString(item.LinkText), item.ActionName, item.ControllerName)
                        }
                        @Html.Raw("</li>")
                    }
                }
             <li class = 'nav-header hidden-tablet'>@rm.GetString("Quan_ly_tai_khoan")</li>
            <li style='margin-left: -2px;'> @Html.ActionLink(rm.GetString("thong_tin_tai_khoan"),"Index","System")</li>
            <li class = 'nav-header hidden-tablet'>@rm.GetString("SystemSetting")</li>
            <li style='margin-left: -2px;'> @Html.ActionLink(rm.GetString("quan_ly_tap_tin_he_thong"),"Index","System")</li>
            <li style='margin-left: -2px;'> @Html.ActionLink(rm.GetString("cau_hinh_he_thong"),"Setting","System")</li>
        </ul>
        <label style="display: none" id="for-is-ajax" class="hidden-tablet" for="is-ajax">
            <div class="checker" id="uniform-is-ajax"><span>
                <input id="is-ajax" type="checkbox" checked="true" style="opacity: 0;"></span></div>
            Ajax on menu</label>

    </div>
</div>

